package com.goods.pojo;

public class Page {
	private int pageNo;// 当前页
	private int totalPageCount;// 总页数
	private int PageSize;// 每页总条数
	private int totalCount;// 总条数
	private int currentRow;

	

	public int getPageNo() {
		if (pageNo==0) {
			pageNo=1;
		}
		return pageNo;
	}

	public void setPageNo(int pageNo) {
		this.pageNo = pageNo;
		this.currentRow=(pageNo-1)*PageSize;
	}
	public int getPageSize() {
		return PageSize;
	}

	public void setPageSize(int pageSize) {
		PageSize = pageSize;
	}

	

	public int getCurrentRow() {
		return currentRow;
	}

	public void setCurrentRow(int currentRow) {
		this.currentRow = currentRow;
	}

	public int getTotalPageCount() {
		return totalPageCount;
	}

//	public void setTotalPageCount(int totalPageCount) {
//		this.totalPageCount = totalPageCount;
//	}

	public int getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
		this.totalPageCount = totalCount % PageSize > 1 ? (totalCount / PageSize) + 1
				: totalCount / PageSize;

	}

}
